module.exports = app => {
  const mongoose = require('mongoose')
  mongoose.connect('mongodb://localhost/graduationCopyWriter', {
    useNewUrlParser: true,
    useUnifiedTopology: true
  })
  mongoose.connection.once('open', () => {
    console.log('数据库连接成功')
  })
}
